import request from '@/utils/request'

export function pageTags(query) {
  return request({
    url: '/vendor/tag/list',
    method: 'get',
    params: query
  })
}

export function listAllTags(query) {
  return request({
    url: '/vendor/tag/listAll',
    method: 'get',
    params: query
  })
}
export function queryGoodsTags(query) {
  return request({
    url: '/goods/getGoodsTags',
    method: 'get',
    params: query
  })
}

export function delTag(data) {
  return request({
    url: '/vendor/tag/delete',
    method: 'post',
    data
  })
}

export function publishTag(data) {
  return request({
    url: '/vendor/tag/create',
    method: 'post',
    data
  })
}
export function publishTags(data) {
  return request({
    url: '/vendor/tag/createBatch',
    method: 'post',
    data
  })
}

export function detailTag(id) {
  return request({
    url: '/vendor/tag/read',
    method: 'get',
    params: { id }
  })
}

export function editTag(data) {
  return request({
    url: '/vendor/tag/update',
    method: 'post',
    data
  })
}

